package com.hzeport.bgs22emduty.outbound.db;

import com.hzeport.bgs22emduty.entity.ParamScheduleSetting;
import com.hzeport.bgs22emduty.outbound.ParamScheduleSettingRepository;
import com.hzeport.bgs22emduty.outbound.db.mapper.ParamScheduleSettingMapper;
import com.hzeport.bgs22emduty.util.DutySortUtil;
import com.hzeport.bgs22emduty.common.base.BaseRepositoryImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
@RequiredArgsConstructor
public class ParamScheduleSettingRepositoryImpl extends BaseRepositoryImpl<ParamScheduleSettingMapper, ParamScheduleSetting> implements ParamScheduleSettingRepository {

    final private DutySortUtil dutySortUtil;

    @Override
    public List<ParamScheduleSetting> getList(String id, String value) {
        final List<ParamScheduleSetting> list = mapper.getList(id, value);
        return dutySortUtil.sortParamScheduleSetting(list);
    }
}

